package com.example.sangong.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.sangong.entity.Person;
import com.example.sangong.entity.PersonExport;
import com.example.sangong.entity.PersonImport;
import com.example.sangong.req.person.PersonAddReq;
import com.example.sangong.req.person.PersonInfoReq;
import com.example.sangong.req.person.PersonQueryReq;
import com.example.sangong.req.person.PersonUpdateReq;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PersonService {
    Person selectPersonById(PersonInfoReq req);


    void addPerson(PersonAddReq req);
    void updatePerson(PersonUpdateReq req);

    List<Person> selectByName(PersonQueryReq req);

    Boolean deleteById(Long id);

    /**
     * 分页查询
     * @param req
     * @return
     */
    public IPage<Person> getUserPage(PersonQueryReq req);

    public IPage<Person> selectPageCustom(PersonQueryReq req);


    List<PersonExport> getExportPersonList(String name);

    Integer importData(List<PersonImport> userList);

}
